﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QL_BenXe
{
    public partial class frm_Main : Form
    {
        public frm_Main()
        {
            InitializeComponent();
        }

        private void thêmVéĐặtVéToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_QLBanVe"))
                {
                    form.Close();
                }
            }
            frm_QLBanVe frm = new frm_QLBanVe();
            frm.MdiParent = this;
            frm.Show();
        }

        private void cậpNhậtVéHủyVéToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_QLCapNhatVe"))
                {
                    form.Close();
                }
            }
            frm_QLCapNhatVe frm = new frm_QLCapNhatVe();
            frm.MdiParent = this;
            frm.Show();
        }

        private void lậpLịchXeChạyToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_QLLichXeChay"))
                {
                    form.Close();
                }
            }
            frm_QLLichXeChay frm = new frm_QLLichXeChay();
            frm.MdiParent = this;
            frm.Show();
        }

        private void frm_Main_Load(object sender, EventArgs e)
        {

        }

        private void tìmKiếmNângCaoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_SearchLichXeChay"))
                {
                    form.Close();
                }
            }
            frm_SearchLichXeChay frm = new frm_SearchLichXeChay();
            frm.MdiParent = this;
            frm.Show();
        }

        private void traCứuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_SearchNhanVien"))
                {
                    form.Close();
                }
            }
            frm_SearchNhanVien frm = new frm_SearchNhanVien();
            frm.MdiParent = this;
            frm.Show();
        }

        private void traCứuToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_SearchKhachHang"))
                {
                    form.Close();
                }
            }
            frm_SearchKhachHang frm = new frm_SearchKhachHang();
            frm.MdiParent = this;
            frm.Show();
        }

        private void đặtVéToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Form form in this.MdiChildren)
            {
                if (form.Name.Equals("frm_QLDatVe"))
                {
                    form.Close();
                }
            }
            frm_QLDatVe frm = new frm_QLDatVe();
            frm.MdiParent = this;
            frm.Show();
        }
    }
}
